package com.hackerrank.challenges.isfibo;

import java.util.Scanner;

public class Solution {
	private static boolean isFibo(long N) {
		long n1 = 0, n2 = 1;
		if(n1 == N)
			return true;
		while(n2 < N) {
			long t = n1 + n2;
			n1 = n2;
			n2 = t;
		}
		return n2 == N;
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T = in.nextInt();
		for(int t = 0; t < T; t++) {
			long N = in.nextLong();
			if(isFibo(N))
				System.out.println("IsFibo");
			else
				System.out.println("IsNotFibo");
		}
	}
}
